﻿/**
*生成业绩
*/
Chenxin.UI.ProduceFeatForm = Chenxin.extend(Chenxin.UI.FormCommon, {
    actionUrl: '/service/logic/ShowListBargain.ashx',
    id: 'jqm_ProduceFeatForm',
    jqmWidth: 700,
    defBBtn: true,
    createForm: function() {
        return Chenxin.FormCommon.ProduceFeatForm(this.id);
    },
    initEvent: function() {
		var _this=this;
		$('.x-input-date').focus(function() {
			WdatePicker({ 
				oncleared: function() { 
					$(this).blur(); 
				}, 
				onpicked: function() { 
					$(this).blur(); 
				},
				readOnly:true,
				minDate:_this.minDate
			});
		});
    },
    initFormValidator: function() {
        //收取时间
        $('#' + this.id + '_ArchivementDate').formValidator({
            validatorgroup: this.id,
            onshow: "请输入归属时间",
            onfocus: "请输入归属时间",
            oncorrect: " "
        }).inputValidator({
            min: 1,
            empty: {
                leftempty: false,
                rightempty: false,
                emptyerror: "请输入归属时间"
            },
            onerror: "请输入归属时间"
        });
    },
    reset: function() {
        Chenxin.UI.ProduceFeatForm.superclass.reset.call(this);
    },
    initComponent: function(){	
		var date=new Date();
		this.minDate=date.getFullYear()+'-'+(date.getMonth()+1)+'-01';
        Chenxin.UI.ProduceFeatForm.superclass.initComponent.call(this);

    }
});

Chenxin.FormCommon.ProduceFeatForm = function(formId) {// height:100px;overflow:auto;
return '<table class="tbl_f"><tr><th style="width:100px;height:25px;">成交编号：</th><td><input type="text" style="width: 160px;" class="inputbox_n fl" readonly="readonly" name="ContractCode"></td><th style="width:100px;">成交日期：</th><td><input type="text" readonly="readonly" name="ContractDate" style="width:160px;" class="inputbox_n fl"></td></tr><tr><th style="height:25px;">房源面积：</th><td><input type="text" readonly="readonly" name="Area" style="width:160px;" class="inputbox_n fl"></td><th>合同标的：</th><td><input type="text" name="BargainPrice" readonly="readonly" id="BargainPrice" style="width:160px;" class="inputbox_n fl"></td></tr><tr><th style="height:25px;">房源地址：</th><td colspan="3"><input type="text" name="HouseAddress" id="HouseAddress" readonly="readonly" style="width:505px;" class="inputbox_n fl"></td></tr><tr><td colspan="4"><hr style="width:98%;"/></td></tr><tr><th style="height:25px;">上家姓名：</th><td><input class="inputbox_n fl" type="text" readonly="readonly" name="VenderName" style="width:160px"/></td><th>下家姓名：</th><td><input class="inputbox_n fl" type="text"  name="BuyerName"  style="width:160px" readonly="readonly"/></td></tr><tr><th style="height:25px;">上家电话：</th><td><input class="inputbox_n fl" type="text" readonly="readonly" name="VenderPhone" style="width:160px"/></td><th>下家电话：</th><td><input class="inputbox_n fl" type="text"  name="BuyerPhone"  style="width:160px" readonly="readonly"/></td></tr><tr><th style="height:25px;">上家标准佣收：</th><td><input class="inputbox_n fl" type="text" readonly="readonly" name="VStanCommision" style="width:160px"/></td><th>下家标准佣收：</th><td><input class="inputbox_n fl" type="text"  name="BStanCommision"  style="width:160px" readonly="readonly"/></td></tr><tr><th style="height:25px;">上家确认佣收：</th><td><input class="inputbox_n fl" type="text" readonly="readonly" name="VRealCommision" style="width:160px"/></td><th>下家确认佣收：</th><td><input class="inputbox_n fl" type="text" name="BRealCommision"  style="width:160px" readonly="readonly"/></td></tr><tr><th style="height:25px;">上家折佣：</th><td><input class="inputbox_n fl" type="text" readonly="readonly" name="VCommision" style="width:160px"/></td><th>下家折佣：</th><td><input class="inputbox_n fl" type="text" name="BCommision"  style="width:160px" readonly="readonly"/></td></tr><tr><th style="height:25px;">上家咨询费：</th><td><input class="inputbox_n fl" type="text" readonly="readonly" name="VConsulting" style="width:160px"/></td><th>下家咨询费：</th><td><input class="inputbox_n fl" type="text" name="BConsulting"  style="width:160px" readonly="readonly"/></td></tr><tr><td colspan="4" id="' + formId + '_showpoint"></td></tr><tr><td colspan="4"><hr style="width:98%;"/></td></tr><tr><th style="height:25px;">归属时间：</th><td colspan="3"><input type="text" style="width: 160px;" readonly="readonly" id="' + formId + '_ArchivementDate" class="inputbox_n fl x-input-date" name="ArchivementDate"><div style="float: left; margin-left: 5px; width:90px;height: 26px; line-height: 26px; text-align: left;" id="' + formId + '_ArchivementDateTip"></div></td></tr></table>';
}